package com.training.java.core.collections.car.post15;


import java.util.ArrayList;

import java.util.List;



public class SchoolDemo {

	public static void main(String[] args) {
		
		School school1 = new School("Legacy", "Ashburn", 7);
		School school2 = new School("Riverdale", "Herndon", 5);
		School school3 = new School("Hillside", "Farmington", 3);
		
		
		List<School> schools = new ArrayList<School>();
		
		schools.add(school1);
		schools.add(school2);
		schools.add(school3);
		
		for(School aSchool : schools){
			
			System.out.println("Name = " + aSchool.getName());
			System.out.println("City = " + aSchool.getCity());
			System.out.println("Great School Ranking  = " + aSchool.getGreatSchoolRanking());
			
		}
		

		
		
		
		

	}

}
